3D Graphics Programming with QuickDraw 3D 1.5.4
Previous | QD3D Book | Overview | Chapter Contents | Next |
Custom attributes may be inherited or not, as determined by the metahandler. If inheritance is supported, then the metahandler should return kQ3True from the kQ3XMethodTypeAttributeInherit method and kQ3False otherwise.
If inheritance is supported, the inheritance function called internally just copies the data representing the attribute, using the size parameter specified in the registration call. If more complex behavior is desired, however, the custom attribute must be supplied with a TQ3XAttributeCopyInheritMethod method to be called at inheritance time. This might be the case, for example, if there were a variable-size array in the data structure.
The TQ3XAttributeInheritMethod functionality reports whether an application-defined attribute supports inheritance.
#define kQ3XMethodTypeAttributeInherit Q3_METHOD_TYPE('i','n','h','t')
typedef TQ3Boolean TQ3XAttributeInheritMethod;
The TQ3XAttributeCopyInheritMethod functionality performs inheritance of an attribute in an application-defined object.
#define kQ3XMethodTypeAttributeCopyInherit Q3_METHOD_TYPE('a','c','p','i')
typedef TQ3Status (*TQ3XAttributeCopyInheritMethod)(
const void *fromInternalAttribute,
void *toInternalAttribute);
Previous | QD3D Book | Overview | Chapter Contents | Next |